const state = {
	userInfo: {}, //登录人信息
	deleteArr: [], //列表数据
	deleteObj: {}, //列表当前人
	passObj: [], //扫医嘱获取当前列表人
	scanningArray: [],
	sheetObj: {},
	gifArray: [], // 消息弹框
	adminValue: "", // 管理员
	alertList: [],
	socketShow: '',
	messageShow: false,
	siveShow: false,
	vitalShow: false,
	hoseIndex:'A002',
	notifyObject: {
		pt_callsys: {},
		iv_sys: {}
	}
}

const mutations = {
	set_deleteArr: (state, data) => {
		state.deleteArr = data
		uni.setStorageSync('deleteArr', data)
	},
	set_deleteObj: (state, data) => {
		state.deleteObj = data
		uni.setStorageSync('deleteObj', data)
	},
	set_userInfo: (state, data) => {
		state.userInfo = data
		uni.setStorageSync('userInfo', data)
	},
	set_passObj: (state, data) => {
		// console.log(state, data);
		state.passObj = data
		uni.setStorageSync('passObj', data)
	},
	set_scanningArray: (state, data) => {
		state.scanningArray = data
		uni.setStorageSync('scanningArray', data)
	},
	set_sheetObj: (state, data) => {
		state.sheetObj = data
		uni.setStorageSync('sheetObj', data)
	},
	set_gifArray: (state, data) => {
		state.gifArray = data
		uni.setStorageSync('gifArray', data)
	},
	set_adminValue: (state, data) => {
		state.adminValue = data
		uni.setStorageSync('adminValue', data)
	},
	set_alertList: (state, data) => {
		state.alertList = data
		// uni.setStorageSync('alertList', data)
	},
	set_socketShow: (state, data) => {
		state.socketShow = data
		uni.setStorageSync('socketShow', data)
	},
	set_messageShow: (state, data) => {
		state.messageShow = data
	},
	set_hoseIndex: (state, data) => {
		state.hoseIndex = data
		uni.setStorageSync('hoseIndex', data)
	},
	set_siveShow: (state, data) => {
		state.siveShow = data
	},
	set_vitalShow: (state, data) => {
		state.vitalShow = data
	},
	set_NOTIFY: (state, data) => {
		console.log('data',data);
		state.notifyObject = data
	},
}

export default {
	namespaced: true,
	state,
	mutations
}
